#include <iostream>
#include <map>
#include <algorithm> //std::for_each

using namespace std;
int main(){
    map<int,int> myMap = {{4,40},{5,50},{6,60}};
    for_each(myMap.cbegin(),myMap.cend(),[](const pair<int,int>&p)
        {cout << p.first << "->"<<p.second << endl;});
}